import { Column, Entity, ManyToOne } from 'typeorm';
import { CommonEntity } from '../../../../util/entity/common.entity';
import { User } from '../../../admin/user/entities/user.entity';
import { Weapon } from '../../weapon/entities/weapon.entity';

@Entity('dnf_user_weapon')
export class UserWeapon extends CommonEntity {
  @Column({ type: 'tinyint', comment: '当前强化等级' })
  level: number;
  @Column({ type: 'smallint', comment: '名望加成' })
  fame: number;
  @Column({ type: 'smallint', comment: '数值加成' })
  num: number;

  constructor() {
    super();
    this.level = 0;
    this.fame = 0;
    this.num = 0;
  }

  @ManyToOne(() => User)
  user: User;

  @ManyToOne(() => Weapon)
  weapon: Weapon;
}
